import { useState } from 'react'
import { useToggle } from 'ahooks'
import './App.css'

function App() {
  // const [isOn, setIsOn] = useState(false)
  const [state, {toggle}] = useToggle(false)
  const doToggle = () => {
    // isOn === false ? setIsOn(true) : setIsOn(false)
    setToggle(!toggle)
  }

  return (
    <div className="App">
      {`${state}`}
      <button onClick={toggle}>Toggle</button>
    </div>
  )
}

export default App
